package cn.sylinx.horm.example.benchmark.mybatis;

import java.util.List;

import org.springframework.stereotype.Service;

@Service
public class UserService {

    private UserMapper userMapper;

    public UserService(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    public UserMybatis getById(Long id) {
        UserMybatis user = userMapper.getById(id);
        return user;
    }

    public int deleteAllData() {
        return userMapper.deleteAllData();
    }

    public List<UserMybatis> select(Long id, int count) {
        return userMapper.select(id, count);
    }

    public int update(Long id, String userName, String upass) {
        return userMapper.update(id, userName, upass);
    }

}
